extends Node2D

@onready var camera := $Camera2D 

const credits_menu := preload("res://scenes/main_menu/credits_menu/credits_menu.tscn")

# Called every frame. 'delta' is the elapsed time since the previous frame.
func move_camera() -> void:
	var tween = get_tree().create_tween()
	tween.set_trans(Tween.TRANS_QUAD)
	tween.tween_property(camera, "position", Vector2(192,288), 1.5)

func _on_play_button_pressed() -> void:
	TransitionManager.change_scene_to_file("res://scenes/menus/level_select/level_select.tscn")


func _on_credits_button_pressed() -> void:
	var credits_menu_ = credits_menu.instantiate()
	credits_menu_.position = Vector2(0,192)
	add_child(credits_menu_)
	move_camera()
